Optical elements, such as lenses, can be used to match the radiation characteristic of optoelectronic components to specified values. An optoelectronic element of this type is, for instance, described in document DE 10 2005 020 908 A1 (U.S. equivalent Publication 2008/0210962). In this component, a prefabricated lens is placed onto a semiconductor body that generates radiation and is mounted in a housing. In order to protect the semiconductor body, it is cast into a covering before the prefabricated lens is put in place. In this optoelectronic component, the lens is manufactured separately, and is attached in an additional assembly process. This gives rise to additional assembly work and to additional potential sources of faults.